package com.ctsi.common;

public enum ErrorCode {
    // 公共错误码
    SUCCESS("0000", "SUCCESS"),
    ERROR("-1", "ERROR"),
    ROP_INVOKE_EXCEPTION("-2", "ROP INVOKE EXCEPTION"),
    LACK_OF_PARAM("-3", "LACK_OF_PARAM"),
    SPEC_VALUES_CAN_NOT_BE_NULL("-7", "规格值不能为空"),
    FORBID_CONSUMER("-8", "网络开小差了，请重试！"),
    FILE_UPLOAD_ERROR("-9", "附件上传失败"),
    FORBID_UPLOAD_ERROR("-10", "非法的附件类型"),
    NOT_LOGIN("100", "用户未登录"),
    INVALID_TOKEN("101", "TOKEN无效"),
    LOST_TOKEN("102", "TOKEN缺失"),
    SYSTEM_ERROR("500", "服务器内部错误"),
    PAGE_NOT_FOUND("404", "页面找不到"),
    PARAMETER_ERROR("400", "请求参数异常"),
    NOT_JURISDICTION("501","没有该权限"),
    AUTHENTICATION("502","没有身份验证");

    private final String code;
    private final String desc;

    private ErrorCode(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

}

